package com.ns.scs.task.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ns.scs.task.dto.ScheduledActuatorPageDto;
import com.ns.scs.task.entity.ScheduledActuator;
import com.ns.scs.task.mapper.ScheduledActuatorMapper;
import com.ns.scs.task.service.IScheduledTaskActuatorService;
import com.ns.scs.task.vo.ScheduledActuatorVO;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 任务执行器业务实现类
 *
 * @author lw
 * @since 2024/11/11
 */
@Slf4j
@Service
@RequiredArgsConstructor
public class ScheduledTaskActuatorServiceImpl extends ServiceImpl<ScheduledActuatorMapper, ScheduledActuator> implements IScheduledTaskActuatorService {

    private final ScheduledActuatorMapper mapper;

    @Override
    public void deleteByIds(List<Long> ids) {
        mapper.deleteByIds(ids);
    }

    @Override
    public Page<ScheduledActuatorVO> getList(ScheduledActuatorPageDto dto) {
        return mapper.getList(dto, new Page<>(dto.getCurrent(), dto.getSize()));
    }
}
